package com.yyp.car.dao;

import java.util.List;

import org.springframework.stereotype.Repository;

import com.hdw.basic.dao.BaseDao;
import com.yyp.car.Idao.INoticeDao;
import com.yyp.car.model.Notice;
@Repository("noticeDao")
public class NoticeDao extends BaseDao<Notice> implements INoticeDao{

	@Override
	public List<Notice> listNotice() {
		String hql="from Notice order by time desc";
		return this.list(hql);
	}
	@Override
	public Notice findNotice(int id) {
		String hql="from Notice n where n.id='"+id+"'";
		return (Notice)this.queryObject(hql);
	}
}
